home *** CD-ROM | disk | FTP | other *** search
- This is a quick DOCument file for my Program 'CDTECT'.
- Included in this .ARC file is....
-
- CDTECT.DOC - This brief file
- CDTECT.ASM - .ASM source for CDTECT, self documenting, with
- commented code, explanations, etc.
- CDTECT.COM - The executable version.
-
- In order to create the executable version I used the following commands.
-
- MASM CDTECT;
- LINK CDTECT;
- EXE2BIN CDTECT.EXE CDTECT.COM
-
- Nothing fancy, just don't forget to run it thru EXE2BIN if you decide
- to modify it. (Ignore the no stack warning of course!)
- Assembled with MASM 5.0 and linked with MS Link 3.61, although it should
- work on anything since it is a VERY simple programs.
-
- CDTECT is a very simple routine that checks for Carrier Detect on COM1,
- and sets the DOS errorlevel to 2 if CD is True. The program operation is
- discussed fully in the comments within the source code. Should you not
- care to look at the source, needless to say, here's how you can use it if
- you're one who doesn't want to take a minute to look elsewhere.
-
- in your batch file, execute CDTECT. CDTECT will then set the dos errorlevel
- to 2 if CD was found true at time of execution. If you want to take action 1
- if CD is true and action 2 if cd is false, use this fragment in your batch file.
-
- ....
- ... (other junk)
- ....
- CDTECT
- if errorlevel 2 goto action1
- :action2
- rem whatever you want to do here...
- goto exit
- rem
- :action1
- rem ...whatever..
- :exit
- ..
- .....
- .....
-
- In my case, i use it to either re-load RBBS, or a mail program depending whether
- or not a caller has dropped off line between exiting RBBS and a door or wherever.
- Since I'm multi-tasking, Watchdog would re-boot the whole system, and possibly
- throw the second caller off also.
-
- IF you have any comments, please send them to...... SYSTEM-2 RBBS (215)584-1412
- Ed Barboni. As usual, you use this program at your own risk. I make no guarantees
- but it works great on my PC. (Not tested on other machines, but if ports are the
- same it should work ok also. The worst it can do is to report false CD results.